package com.jg.controller;

import com.jg.comm.responce.PageResult;
import com.jg.comm.responce.R;
import com.jg.model.dto.CategoriesQuery;
import com.jg.model.entity.Categories;
import com.jg.service.CategoriesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 类别表 前端控制器
 * </p>
 *
 * @author 86130
 * @since 2025-09-19 11:21
 */
@RestController
@RequestMapping("/categories")
public class CategoriesController {

    @Autowired
    private CategoriesService categoriesService;
    @PostMapping("/list")
    public R<PageResult<Categories>> getCategoryList(CategoriesQuery categoriesQuery) {
        PageResult<Categories> categoryPage = categoriesService.getCategoryPage(categoriesQuery);
        return R.success(categoryPage);
    }



}
